package com.azt.api.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 询价与设计
 * @author 张栋  2016年8月8日下午3:42:52
 */
public enum EnqEnquiryQtypeEnum {
	
	/*1.设计需求 2.采购询价*/
	ENQ_TYPE_SHEJI(1, "预算询价"), ENQ_TYPE_CAIGOU(2, "采购询价");
	

	private int index;
	private String name;

	private EnqEnquiryQtypeEnum(int index, String name) {
		this.index = index;
		this.name = name;
	}
	

	/**
	 * 获取所有角色
	 * @return
	 */
	public static Map<String, String> getAllStat(){
		Map<String, String>  projects = new HashMap<String,String>();
		for (EnqEnquiryQtypeEnum c : EnqEnquiryQtypeEnum.values()) {
			projects.put(c.getIndex()+"", c.getName());
		}
		return projects;
	}
	
	
	public static String getName(int index) {
		for (EnqEnquiryQtypeEnum c : EnqEnquiryQtypeEnum.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
